from django.test import TestCase

# Create your tests here.

# import  uuid
#
# ret = uuid.uuid4()
# ret = str(ret).replace('-','')
# print(ret)


class Person:
    @property
    def name(self):
        print("getter been executed")
        return self._name

    @name.setter
    def name(self, value):
        print("setter been executed")
        self._name = value

p = Person()
p.name = 't'    # 赋值就执行setter方法，@name.setter： name要和上面被装饰的属性的名字一样，下面的方法也要一样
print(p.name)